package ${packageName}.listener;

import com.lam.common.components.easyexcel.imp.listener.BaseListener;
import com.lam.common.components.easyexcel.imp.model.ImportWrapper;
import ${packageName}.entity.${ClassName};
import ${packageName}.entity.imp.${ClassName}Imp;
import ${packageName}.service.${ClassName}Service;

/**
 * ${functionName}导入读取类 
 * 此类不能单例，要每次读取excel都要new 
 * @author ${author}
 *
 */
public class Upload${ClassName}Listener extends BaseListener<${ClassName}Imp, ${ClassName}> {
	
	private ${ClassName}Service ${className}Service;

	public Upload${ClassName}Listener(${ClassName}Service ${className}Service) {
		super(${ClassName}Imp.class, ${ClassName}.class);
		this.${className}Service = ${className}Service;
	}

	//重新该方法可自定义校验数据
//	@Override
//	protected String checkData(ImportEntry<${ClassName}Imp, ${ClassName}> entry) {
//		//自定义校验数据逻辑
//		return null;
//	}

	@Override
	protected void saveSuccessData(ImportWrapper<${ClassName}Imp, ${ClassName}> wrapper) {
		
		${className}Service.importData(wrapper);
	}


}
